package com.kingdee.eas.custom.hr.attendance.app;

import com.kingdee.bos.BOSException;
import com.kingdee.bos.Context;
import com.kingdee.bos.dao.IObjectPK;
import com.kingdee.bos.dao.IObjectValue;
import com.kingdee.bos.util.BOSUuid;
import com.kingdee.eas.common.EASBizException;
import com.kingdee.eas.custom.hr.attendance.ApproveStateEnum;
import com.kingdee.eas.custom.hr.attendance.ExceptionStateEnum;
import com.kingdee.eas.custom.hr.attendance.SpecialChangeEntryInfo;
import com.kingdee.eas.custom.hr.attendance.SpecialChangeReviewFactory;
import com.kingdee.eas.custom.hr.attendance.SpecialChangeReviewInfo;
import com.kingdee.eas.hr.base.HRBillBaseEntryInfo;
import com.kingdee.eas.hr.base.HRBillStateEnum;
import com.kingdee.eas.hr.base.app.HRBillBizBean;

public class SpecialChangeBizBean extends HRBillBizBean {

	public void _addnew(Context context, IObjectPK iobjectpk,
			IObjectValue iobjectvalue) throws BOSException, EASBizException {
		// TODO Auto-generated method stub

	}

	public void _beforeEffectBeforeBackJob(Context context,
			HRBillBaseEntryInfo hrbillbaseentryinfo) throws BOSException,
			EASBizException {
		// TODO Auto-generated method stub

	}

	public void _beforeEffectOnBackJob(Context context,
			HRBillBaseEntryInfo hrbillbaseentryinfo) throws BOSException,
			EASBizException {
		// TODO Auto-generated method stub

	}

	public void _beforeEffectOnNoJob(Context context,
			HRBillBaseEntryInfo hrbillbaseentryinfo) throws BOSException,
			EASBizException {
		// TODO Auto-generated method stub

	}

	public void _check(Context context, IObjectPK iobjectpk,
			IObjectValue iobjectvalue) throws BOSException, EASBizException {
		// TODO Auto-generated method stub

	}

	public void _delete(Context context, IObjectPK iobjectpk)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub

	}

	public void _entryEffect(Context context,
			HRBillBaseEntryInfo hrbillbaseentryinfo) throws BOSException,
			EASBizException {

		SpecialChangeEntryInfo entry = (SpecialChangeEntryInfo) hrbillbaseentryinfo;

		SpecialChangeReviewInfo review = new SpecialChangeReviewInfo();
		review.setPerson(entry.getPerNumber());
		review.setBill(entry.getBill());
		review.setApproveState(ApproveStateEnum.NOT_APPROVE);
		review.setExceptionState(ExceptionStateEnum.EXCEPTION);
		review.setAttendBeginDate(entry.getAttendBeginDate());
		review.setAttendEndDate(entry.getAttendEndDate());
		review.setRestBeginDate(entry.getScRestBeginDate());
		review.setRestEndDate(entry.getScRestEndDate());
		
		SpecialChangeReviewFactory.getLocalInstance(context).save(review);
	}

	public void _processBeforeAddNew(Context context, IObjectValue iobjectvalue)
			throws BOSException, EASBizException {
		// TODO Auto-generated method stub

	}

	public void _setBillState(Context context, BOSUuid bosuuid,
			HRBillStateEnum hrbillstateenum) throws BOSException,
			EASBizException {
		// TODO Auto-generated method stub

	}

	public void _update(Context context, IObjectPK iobjectpk,
			IObjectValue iobjectvalue) throws BOSException, EASBizException {
		// TODO Auto-generated method stub

	}

}
